/*! \file Predictor.hpp */

#ifndef PREDICTOR_HPP_INCLUDED
#define PREDICTOR_HPP_INCLUDED

#include <map>
#include "Graph.hpp"
#include "boost/tuple/tuple.hpp"

#include "GraphDatabase.hpp"

namespace TopologicalLearner
{

//class Graph;
//class GraphDatabase;

/** An abstract baseclass that defines the functionality of a predictor.
 * This class abstracts the neccessary functionality that a Predictor should provide.
 * A Predictor is here defined as a class that has a function that, given an input graph returns a
 * discrete probability distribution over all edit operations on the input graph.
*/
class Predictor
{
protected:
    const GraphDatabase* m_pD;
    unsigned int m_iExcludeID;

public:

    Predictor() : m_pD(0) {}
    Predictor(const GraphDatabase* pD) : m_pD(pD) {}

    /**
    * Gives a discrete distribution of probable edit operations of the graph G.
    * @param G The Graph to use for prediction.
    * @return Returns an EditOpDist object that describes all the probable edit operations on graph G.
    */
    virtual EditOpDist Predict(const Graph& G) const = 0;


    /**
    * Attaches a graph database to the predictor, this is the data that will be used for prediction.
    */
    virtual void AttachDatabase(const GraphDatabase* pD) { m_pD = pD; }

    virtual const GraphDatabase* GetDatabase() const { return m_pD; }

    /**
    * Tells the predictor not to include the graph ID in its data set for prediction
    */
    void SetExcludeGraph(unsigned int iID) { m_iExcludeID = iID; }

};

}

#endif // PREDICTOR_HPP_INCLUDED
